From 1c5f14a9e45ceaed1f167febf54c67e7956086fb Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 16 May 2014 14:27:58 -0400 Subject: [PATCH] inspector: Minimal support for gestures We're just showing them as objects in the tree, for now. --- gtk/inspector/widget-tree.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gtk/inspector/widget-tree.c b/gtk/inspector/widget-tree.c index 6b3f69fbde..62dc1a0465 100644 --- a/gtk/inspector/widget-tree.c +++ b/gtk/inspector/widget-tree.c @@ -24,6 +24,7 @@ #include "prop-list.h" #include "widget-tree.h" +#include "gtkwidgetprivate.h" #include enum @@ -316,6 +317,33 @@ gtk_inspector_widget_tree_append_object (GtkInspectorWidgetTree *wt, g_free (address); + if (GTK_IS_WIDGET (object)) + { + struct { + GtkPropagationPhase phase; + const gchar *name; + } phases[] = { + { GTK_PHASE_CAPTURE, "capture" }, + { GTK_PHASE_TARGET, "target" }, + { GTK_PHASE_BUBBLE, "bubble" }, + { GTK_PHASE_NONE, "" } + }; + gint i; + + for (i = 0; i < G_N_ELEMENTS (phases); i++) + { + GList *list, *l; + + list = _gtk_widget_list_controllers (GTK_WIDGET (object), phases[i].phase); + for (l = list; l; l = l->next) + { + GObject *controller = l->data; + gtk_inspector_widget_tree_append_object (wt, controller, &iter, phases[i].name); + } + g_list_free (list); + } + } + if (GTK_IS_CONTAINER (object)) { FindAllData data; -- 2.30.2